<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/8/15
  Time: 19:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
        <%
        String base = request.getContextPath()+"/";
        String url = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+base;
    %>
    <base href="<%=url%>">
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("[type='button']").click(function () {
            var bookId = $("[name='bookId']").val();
            alert(bookId);
            $.get("book/deleBook",{"bookId":bookId},function (str) {
                JSON.stringify(str);
                if(str){
                    alert("删除成功");
                }else{
                    alert("删除失败");
                }


            });

            });
        });
    </script>
</head>
<body>
<a href="index.jsp">返回</a>
<h1>删除图书</h1>
图书编号<input type="text" name="bookId"/><br/>
<input type="button" value="删除">
</body>
</html>
